<%@ page language="java" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta  http-equiv="X-UA-Compatible"  content="IE=Edge">
	<title>软件工程知识体系管理系统</title>
	
	<%@include file="/WEB-INF/jsp/public/commons.jspf" %>
	
	<link  href="./style/register/base.css"  type="text/css"  rel="stylesheet">
	<link  href="./style/register/login.css"  type="text/css"  rel="stylesheet">
	<script  src="./style/register/jquery-1.8.2.min.js"  type="text/javascript"></script>
	<script  src="./style/register/register.js"  type="text/javascript"></script>
	<style  type="text/css">
		.regForm,.username, .login, .makesure, #Phoneyan, #Regyan{width: 700px!important;}
		.regForm,.regForm div{padding: 0!important;}
		label{width: 100px;display: inline-block;text-align: right;}
	</style>
	<script type="text/javascript">
		
	
		$(function(){

			$("#user_name").focusout(function() {

				if($('#user_name').val().length >=6){

					$.ajax({
						type: 'post' ,
						url: 'register_findByName.action' ,
						cache:false ,
						data:{findName:$('#user_name').val()},
						dataType:'json' ,
						success:function(result){
							$("#nameMsg").text(result.message)
							if(result.status =="error"){
								$("#nameMsg").text(result.message).css("color","red");
								var flag1 = false;
							}else{
								$("#nameMsg").text(result.message).css("color","green");
								flag1 = true;
							}
						} 
					});
				}
			})

			$("#pwd").focusout(function(){
				if($("#pw").val() != $("#pwd").val()){
					$("#pwdMsg").text("两次密码不一致").css("color","red");
					var flag2= false;
				}else{
					$("#pwdMsg").text("通过").css("color","green");
					flag2= true;

				}		
			});

			$("#checkcode").bind("mouseout",function(){
				
				$.ajax({
					type: 'post' ,
					url: 'checkCode_contrast.action' ,
					cache:false ,
					data:{clientCode:$('#vercode').val()},
					dataType:'json' ,
					success:function(result){
						$("#ccMsg").text(result.message)
						if(result.status =="error"){
							$("#ccMsg").css("color","red");
							var flag3= false;
						}else{
							$("#ccMsg").css("color","green");
							var flag3= true;
						}
					} 
				});
			});
			
		});

		function check(){
			if(flag1 && flag2 &&flag3){
				$("#myform").submit();
			}
		}
		
	</script>
</head>

<body >

<div  class="header">
	<div  class="wrapper">
		<div  class="logo" style="margin-top:-10px"><a  href="http://localhost:8080/kl/"  target="_blank"><img  src="./style/register/pic/logo.gif"></a></div>
		<ul  class="site-nav-right">
			<li  class="sus"><a  href="http://localhost:8080/kl/login.jsp">登录</a></li>
			<li><a  target="_blank"  href="http://localhost:8080/kl/">软件工程知识体系管理系统</a></li>
		</ul>
	</div>
</div>


<div  class="wrapper container">
	<div  class="RegBox">
		<div  class="RegTitle"><span  class="wel_reg">欢迎注册</span> ( 如已有帐号，请<a  class="blue1"  href="http://localhost:8080/kl/login.jsp"> 点此登录 </a>)</div>
		
		<form id="myform" action="register_register.action"  method="post"  class="fillBox regForm" onclick="check();">
			<div  class="username"  id="username">
				<label  for="vip"  class="einfo">登录名:</label>
				<span  style="display:inline-block;position:relative;">
					<ul  id="mailListBox_0"  class="justForJs emailist"  style="min-width:292px;_width:292px;position:absolute;left:-6000px;top:37px;z-index:1;"></ul>
					<input  type="text"  name="loginName"  class="usr easyui-validatebox" required=true validType="midLength[6,18]" missingMessage="用户名必填!" invalidMessage="用户名必须在6到18个字符之间!"  id="user_name"  placeholder="6~18位数字、字母或字符组合的登录名"  maxlength="18"  autocomplete="off">
				</span>
				<span  class="rightMsg" id="nameMsg"></span>
			</div>

			<div  class="login">
				<label  class="einfo"  for="pw">登录密码:</label>
				<input  id="pw" name="password" type="password"  placeholder="6~18位数字、字母或字符组合的密码"  class="usr easyui-validatebox"  maxlength="18" required=true validType="midLength[6,18]" missingMessage="密码必填!" invalidMessage="密码必须在6到18个字符之间!">
			</div>
			<div  class="makesure">
				<label  class="einfo"  for="pw">确认密码:</label>
				<input  id="pwd"  type="password"  placeholder="重复输入密码"  class="usr"  maxlength="16">
				<span  class="rightMsg" id="pwdMsg"></span>
			</div>
			<div  class="yanzheng clearfix Regyan"  id="Regyan">
				<div  class="verblock">
					<label  for="vercode"  class="einfo">验证码:</label>
					<input  type="text"  id="vercode"  name="codeStr"  class="verify"  maxlength="6"  value="" placeholder="验证码">
					<div  class="pic">
						<img  src="/kl/checkCode_getCheckImg.action"  alt="点击刷新验证码"  title="点击刷新验证码" onclick="location.reload();" style="vertical-align:middle;margin-bottom:3px;cursor:pointer;"  id="checkcode">
					</div>
					<span  class="rightMsg" id="ccMsg"></span>
				</div>
			</div>

			<div  class="ctime protype">
         		<span  lid="1"   class="login_ctime check"></span>
               	<span   class="free_l">我已阅读并同意<a  target="_blank"  class="blue1"  href="javascript:void(0);">《服务协议》</a></span>
       		</div>

			<div  class="reg"><input  type="submit"  value="同意协议并注册"  id="regBtn"  class="gBtn"  ></div>
		</form>
	</div>
    
</div>


<div  class="footer">
	 <div region="south" title="" style="height:40px;text-align: center">
		    	<span style="font-size:12px;color:#46A3FF">帮助中心 | 网站客服 | 投诉中心 | 网站协议</span><br/>
       			<span style="font-size:11px;color:#666;margin-top:35px;margin-bottom:0px">©2014 中北大学</span>
		    
  	</div>  
</div>




